<template>
  <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
    <van-swipe-item v-for="(item) in banarlist" :key="item.products_id">
      <img  :src="item.file" @click="godetile(item.products_id)">
    </van-swipe-item>

  </van-swipe>
</template>

<script>
export default {
  name: "Swipe",
  props:["banarlist"],
  created() {

  },
  methods:{
    godetile(product_id){
      this.$router.push({name:"ProductDetail", query:{product_id:product_id}})
    }
  }

}

</script>

<style scoped lang="less">
.my-swipe .van-swipe-item {
  color: #fff;
  font-size: 20px;
  line-height: 150px;
  text-align: center;
  background-color: #39a9ed;
}

.van-swipe-item{
  width: 100%;
  height: 250px;
  img{
    display: block;
    width: 100%;
    height: 100%;
  }
}

</style>